<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<title> GettingStartedEclipse &lt; Mundo &lt; Foswiki</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="icon" href="/foswiki/pub/System/ProjectLogos/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/foswiki/pub/System/ProjectLogos/favicon.ico" type="image/x-icon" />
<link rel="alternate" href="http://127.0.0.1/foswiki/bin/edit/Mundo/GettingStartedEclipse?t=1295995542" type="application/x-wiki" title="edit GettingStartedEclipse" />
<meta name="TEXT_NUM_TOPICS" content="Number of topics:" />
<meta name="TEXT_MODIFY_SEARCH" content="Modify search" />
<meta name="robots" content="noindex" /><link rel="alternate" type="application/rss+xml" title="RSS Feed" href="/foswiki/bin/view/Mundo/WebRss" />
<style type="text/css" media="all">
@import url('style/base.css');
</style>
<style type="text/css" media="all">
@import url('style/layout.css');
@import url('style/style.css');
@import url('style/colors.css');
</style>
<style type="text/css" media="all">
@import url('style/column_left.css');
@import url('style/variant_foswiki_noframe.css');
</style><style type="text/css" media="all">
	/* Styles that are set using variables */
	.patternBookView .foswikiTopRow,
	.patternWebIndicator a img,
	.patternWebIndicator a:hover img {
		background-color:#efefef;
	}
	#patternTopBarContents { background-image:url(/foswiki/pub/System/PatternSkin/header5.gif); background-repeat:repeat-x;}
#patternTopBarContents { background-color:#ffffff;}
.patternBookView {
	border-color:#efefef;
}
.patternPreviewPage #patternMain {
	/* uncomment to set the preview image */
	/*background-image:url("/foswiki/pub/System/PreviewBackground/preview2bg.gif");*/
}
</style>
<style type="text/css" media="all">
@import url('style/print.css');
</style>
<!--[if IE]><style type="text/css" media="screen">
pre {
	height:1%;
	overflow-x:auto;
}
.foswikiAttachments,
.foswikiForm,
.foswikiHelp,
.foswikiPreviewArea,
.patternPreviewPage .foswikiForm,
.patternSigLine,
.patternToolBar,
.patternTop,
.patternTopicAction,
#patternSideBarContents .patternLeftBarPersonal,
#patternSideBarContents h2,
#patternSideBarContents li,
#patternTopBarButtons ul {
	height:1%;
}
#patternSideBarContents .patternLeftBarPersonal {
	width:100%;
}
.foswikiFormStep {
	height:100%;
}
#foswikiLogin,
.patternShadow {
	border:10px solid #fff;
	margin-top:10px;
	margin-bottom:10px;
	border:2px solid #ccc;
}
</style><![endif]-->
<!--[if gt IE 8 ]><style type="text/css" media="screen">
#foswikiLogin,
.patternShadow {
	border:10px solid #fff;
	margin-top:10px;
	margin-bottom:10px;
	box-shadow: 0 0 10px #ccc;
}
</style><![endif]-->
<meta name="foswiki.TWISTYANIMATIONSPEED" content="fast" /><!--TWISTYPLUGIN::META-->
<style type="text/css" media="all">
.foswikiTable {border-width:1px}
.foswikiTable .tableSortIcon img {padding-left:.3em; vertical-align:text-bottom}
.foswikiTable td {border-style:solid none; vertical-align:top}
.foswikiTable th {border-style:none solid; vertical-align:top; background-color:#d6d3cf; color:#000000}
.foswikiTable th a:link {color:#000000}
.foswikiTable th a:visited {color:#000000}
.foswikiTable th a:hover {color:#000000; background-color:#d6d3cf}
.foswikiTable th.foswikiSortedCol {background-color:#c4c1ba}
.foswikiTable tr.foswikiTableRowdataBg0 td {background-color:#ffffff}
.foswikiTable tr.foswikiTableRowdataBg0 td.foswikiSortedCol {background-color:#f7f7f6}
.foswikiTable tr.foswikiTableRowdataBg1 td {background-color:#f7f7f6}
.foswikiTable tr.foswikiTableRowdataBg1 td.foswikiSortedCol {background-color:#f0f0ee}
</style><!--TABLEPLUGIN_default-->
<style type="text/css" media="all">
.foswikiTable#tableGettingStartedEclipse1 td {border-style:solid none; vertical-align:middle; vertical-align:top}
.foswikiTable#tableGettingStartedEclipse1 td.foswikiTableCol0 {text-align:center}
.foswikiTable#tableGettingStartedEclipse1 td.foswikiTableCol1 {text-align:left}
.foswikiTable#tableGettingStartedEclipse1 td.foswikiTableCol2 {text-align:left}
.foswikiTable#tableGettingStartedEclipse1 td.foswikiTableCol3 {text-align:right}
.foswikiTable#tableGettingStartedEclipse1 td.foswikiTableCol4 {text-align:left}
.foswikiTable#tableGettingStartedEclipse1 td.foswikiTableCol5 {text-align:left}
.foswikiTable#tableGettingStartedEclipse1 td.foswikiTableCol6 {text-align:left}
.foswikiTable#tableGettingStartedEclipse1 td.foswikiTableCol7 {text-align:center}
.foswikiTable#tableGettingStartedEclipse1 th {border-style:solid none; vertical-align:middle; background-color:#ffffff; color:#0066cc}
.foswikiTable#tableGettingStartedEclipse1 th a:link {color:#0066cc}
.foswikiTable#tableGettingStartedEclipse1 th a:visited {color:#0066cc}
.foswikiTable#tableGettingStartedEclipse1 th a:hover {color:#0066cc; background-color:#ffffff}
.foswikiTable#tableGettingStartedEclipse1 th.foswikiSortedCol {background-color:#eeeeee}
.foswikiTable#tableGettingStartedEclipse1 tr.foswikiTableRowdataBg0 td {background-color:#ffffff}
.foswikiTable#tableGettingStartedEclipse1 tr.foswikiTableRowdataBg0 td.foswikiSortedCol {background-color:#f5f5f5}
</style><!--TABLEPLUGIN_specific-->
<meta name="foswiki.PUBURL" content="http://127.0.0.1/foswiki/pub" /> <!-- PUBURL -->
<meta name="foswiki.PUBURLPATH" content="/foswiki/pub" /> <!-- PUBURLPATH -->
<meta name="foswiki.SCRIPTSUFFIX" content="" /> <!-- SCRIPTSUFFIX -->
<meta name="foswiki.SCRIPTURL" content="http://127.0.0.1/foswiki/bin" /> <!-- SCRIPTURL -->
<meta name="foswiki.SCRIPTURLPATH" content="/foswiki/bin" /> <!-- SCRIPTURLPATH -->
<meta name="foswiki.SERVERTIME" content="25%20Jan%202011%20-%2023:45" /> <!-- SERVERTIME -->
<meta name="foswiki.SKIN" content="pattern" /> <!-- SKIN -->
<meta name="foswiki.SYSTEMWEB" content="System" /> <!-- SYSTEMWEB -->
<meta name="foswiki.TOPIC" content="GettingStartedEclipse" /> <!-- TOPIC -->
<meta name="foswiki.USERNAME" content="guest" /> <!-- USERNAME -->
<meta name="foswiki.USERSWEB" content="Main" /> <!-- USERSWEB -->
<meta name="foswiki.WEB" content="Mundo" /> <!-- WEB -->
<meta name="foswiki.WIKINAME" content="WikiGuest" /> <!-- WIKINAME -->
<meta name="foswiki.WIKIUSERNAME" content="Main.WikiGuest" /> <!-- WIKIUSERNAME -->
<meta name="foswiki.NAMEFILTER" content="%5b%5cs%5c*%3f~%5e%5c%24%40%25%60%22'%26%3b%7c%3c%3e%5c%5b%5c%5d%23%5cx00-%5cx1f%5d" /> <!-- NAMEFILTER --><!--JQUERYPLUGIN::FOSWIKI::META-->
<link rel='stylesheet' href='/foswiki/pub/System/TwistyPlugin/jquery.twisty.css?version=1.6.0' type='text/css' media='all' /><!--JQUERYPLUGIN::TWISTY: requires= missing ids: JavascriptFiles/foswikiPref-->
</head>
<body class="patternViewPage patternPrintPage">
<a name="PageTop"></a><div class="foswikiPage"><div id="patternScreen">
<div id="patternPageShadow">
<div id="patternPage">
<div id="patternOuter">
<div id="patternFloatWrap">
<div id="patternMain">
<div id="patternMainContents">
<div class="patternContent"><div class="foswikiTopic"> <h1><a name="Getting_Started_40Eclipse_41"></a>  Getting Started (Eclipse) </h1>
<p />
<h2><a name="Prerequisites"></a>  Prerequisites </h2>
<p /> <ul>
<li> Eclipse IDE (any recent version will do; <a href="http://www.eclipse.org/" target="_top">http://www.eclipse.org/</a>)
</li></ul> 
<p />
<h2><a name="Installation"></a>  Installation </h2>
<p />
Unpack the distribution package <code>mundocore-java-1.0.0.zip</code>
<p />
Run the configuration script <code>configure.bat</code> (or <code>configure.sh</code>). This will generate the configuration file config/build.properties which contains the system-specific paths for the MundoCore installation:
<p />
<img alt="config-win.png" src="images/config-win.png" />
<p />
<h2><a name="Testing"></a>  Testing </h2>
<p />
In Eclipse, create a new project from existing ant buildfile:
<p />
<img alt="create-from-buildfile.png" height="500" src="images/create-from-buildfile.png" width="525" />
<p />
Select <code>build.xml</code> in the <code>samples/chat/pubsub</code> directory. Make sure that <strong>Link to the buildfile in the file system</strong> is selected:
<p />
<img alt="create-from-buildfile2.png" height="500" src="images/create-from-buildfile2.png" width="525" />
<p />
You can run the sample program now by selecting <strong>Run</strong> from the Eclipse menu.
<p />
To run multiple instances of chat, it is helpful to create run scripts. To do this, invoke the build target <code>runscript</code>, which is the default target of <code>build.xml</code>:
<p />
<img alt="ant-build1.png" height="258" src="images/ant-build1.png" width="756" />
<p />
After you have generated the run scripts, start two instances of the chat program on the same host using <code>run.bat</code> in <code>samples/chat/pubsub</code> using Windows Explorer.
<p />
If you type a line of text (terminated by pressing Enter), the text should also appear as output of the other instance. To quit the program, type <code>.</code> and Enter at the beginning of a line.
<p />
<h2><a name="Node_Configuration"></a>  Node Configuration </h2>
<p />
Initially, MundoCore nodes will only communicate within the local host. To enable communication over the network, a configuration file <code>node.conf.xml</code> must be created and a node discovery method must be enabled. To create a configuration file, invoke the <code>config</code> target of <code>build.xml</code>:
<p />
<img alt="ant-build2.png" height="259" src="images/ant-build2.png" width="764" />
<p />
<img alt="run-ant-config.png" height="720" src="images/run-ant-config.png" width="689" />
<p />
This will bring up the configuration UI. Enable broadcast discovery and save the configuration file as <code>node.conf.xml</code> into the directory of the example <code>samples/chat/pubsub</code>:
<p />
<img alt="configui-enable-broadcast-win.png" height="273" src="images/configui-enable-broadcast-win.png" width="485" />
<p />
With this configuration file, the sample program can be run on two different hosts in the local network. (Please make sure that MundoCore connections and discovery packets are not blocked by personal firewalls!)
<p />
When you are running the program using the <strong>Run</strong> function of Eclipse, you must make sure that the program can find its <code>node.conf.xml</code> configuration file. In <strong>Run Configurations</strong> set the working directory to <code>.../samples/chat/pubsub</code>:
<p />
<img alt="eclipse-set-wd.png" height="720" src="images/eclipse-set-wd.png" width="742" />
<p />
</div></div><!-- /patternContent-->
</div></div></div></div></div></div></div></div>
</body></html>
